home *** CD-ROM | disk | FTP | other *** search
/ IRIX Base Documentation 2002 November / SGI IRIX Base Documentation 2002 November.iso / usr / share / catman / u_man / cat1 / ed.z / ed
Encoding:
Text File  |  2002-10-03  |  43.1 KB  |  793 lines

  1.  
  2.  
  3.  
  4. eeeedddd((((1111))))                                                                    eeeedddd((((1111))))
  5.  
  6.  
  7.  
  8. NNNNAAAAMMMMEEEE
  9.      _eeee_dddd, _rrrr_eeee_dddd - text editor
  10.  
  11. SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS
  12.      _eeee_dddd [_----_ssss] [_----_pppp _s_t_r_i_n_g] [_----_xxxx] [_----_CCCC] [_f_i_l_e]
  13.      _rrrr_eeee_dddd [_----_ssss] [_----_pppp _s_t_r_i_n_g] [_----_xxxx] [_----_CCCC] [_f_i_l_e]
  14.  
  15. DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
  16.      _eeee_dddd is the standard text editor.  _rrrr_eeee_dddd is a restricted version of _eeee_dddd.  If
  17.      the _f_i_l_e argument is given, _eeee_dddd simulates an _eeee command (see below) on the
  18.      named file; that is to say, the file is read into _eeee_dddd's buffer so that it
  19.      can be edited.  Both _eeee_dddd and _rrrr_eeee_dddd process supplementary code set characters
  20.      in _f_i_l_e, and recognize supplementary code set characters in the prompt
  21.      string given to the _----_pppp option (see below) according to the locale
  22.      specified in the _LLLL_CCCC______CCCC_TTTT_YYYY_PPPP_EEEE environment variable (see _LLLL_AAAA_NNNN_GGGG in _eeee_nnnn_vvvv_iiii_rrrr_oooo_nnnn(5)).
  23.      In regular expressions, pattern searches are performed on characters, not
  24.      bytes, as described below.
  25.  
  26.      _----_ssss   Suppresses the printing of byte counts by _eeee, _rrrr, and _wwww commands, of
  27.           diagnostics from _eeee and _qqqq commands, and of the _!!!! prompt after a
  28.           _!!!!_s_h_e_l_l _c_o_m_m_a_n_d.
  29.  
  30.      _----_pppp   Allows the user to specify a prompt string.  The string can contain
  31.           supplementary code set characters.
  32.  
  33.      _----_xxxx   Encryption option; when used, _eeee_dddd simulates an _XXXX command and prompts
  34.           the user for a key.  This key is used to encrypt and decrypt text
  35.           using the algorithm of _cccc_rrrr_yyyy_pppp_tttt(1).  The _XXXX command makes an educated
  36.           guess to determine whether text read in is encrypted or not.  The
  37.           temporary buffer file is encrypted also, using a transformed version
  38.           of the key typed in for the _----_xxxx option.  See _cccc_rrrr_yyyy_pppp_tttt(1).  Also, see the
  39.           NOTES section at the end of this reference page.
  40.  
  41.      _----_CCCC   Encryption option; the same as the _----_xxxx option, except that _eeee_dddd
  42.           simulates a _CCCC command.  The _CCCC command is like the _XXXX command, except
  43.           that all text read in is assumed to have been encrypted.
  44.  
  45.      _eeee_dddd operates on a copy of the file it is editing; changes made to the copy
  46.      have no effect on the file until a _wwww (write) command is given.  The copy
  47.      of the text being edited resides in a temporary file called the _b_u_f_f_e_r.
  48.      There is only one buffer.
  49.  
  50.      _rrrr_eeee_dddd is a restricted version of _eeee_dddd.  It allows only editing of files in
  51.      the current directory.  It prohibits executing shell commands via
  52.      _!!!!_s_h_e_l_l _c_o_m_m_a_n_d.  Attempts to bypass these restrictions result in an error
  53.      message (restricted shell).
  54.  
  55.      Both _eeee_dddd and _rrrr_eeee_dddd support the _ffff_ssss_pppp_eeee_cccc(4) formatting capability.  After
  56.      including a format specification as the first line of _f_i_l_e and invoking
  57.      _eeee_dddd with your terminal in _ssss_tttt_tttt_yyyy _----_tttt_aaaa_bbbb_ssss or _ssss_tttt_tttt_yyyy _tttt_aaaa_bbbb_3333 mode (see _ssss_tttt_tttt_yyyy(1)), the
  58.      specified tab stops are automatically used when scanning _f_i_l_e.  For
  59.      example, if the first line of a file contained:
  60.  
  61.  
  62.  
  63.                                                                         PPPPaaaaggggeeee 1111
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70. eeeedddd((((1111))))                                                                    eeeedddd((((1111))))
  71.  
  72.  
  73.  
  74.           _<<<<_::::_tttt_5555_,,,,_1111_0000_,,,,_1111_5555 _ssss_7777_2222_::::_>>>>
  75.  
  76.      tab stops are set at columns 5, 10, and 15, and a maximum line length of
  77.      72 is imposed.  When you are entering text into the file, this format is
  78.      not in effect; instead, because of being in _ssss_tttt_tttt_yyyy _----_tttt_aaaa_bbbb_ssss or _ssss_tttt_tttt_yyyy _tttt_aaaa_bbbb_3333 mode,
  79.      tabs are expanded to every eighth column.
  80.  
  81.      Commands to _eeee_dddd have a simple and regular structure: zero, one, or two
  82.      _a_d_d_r_e_s_s_e_s followed by a single-character _c_o_m_m_a_n_d, possibly followed by
  83.      parameters to that command.  These addresses specify one or more lines in
  84.      the buffer.  Every command that requires addresses has default addresses,
  85.      so that the addresses can very often be omitted.
  86.  
  87.      In general, only one command can appear on a line.  Certain commands
  88.      allow the input of text.  This text is placed in the appropriate place in
  89.      the buffer.  While _eeee_dddd is accepting text, it is said to be in _i_n_p_u_t _m_o_d_e.
  90.      In this mode, no commands are recognized; all input is merely collected.
  91.      Leave input mode by typing a period (_....) at the beginning of a line,
  92.      followed immediately by pressing RETURN.
  93.  
  94.      _eeee_dddd supports a limited form of _r_e_g_u_l_a_r _e_x_p_r_e_s_s_i_o_n notation; regular
  95.      expressions are used in addresses to specify lines and in some commands
  96.      (for example, _ssss) to specify portions of a line that are to be
  97.      substituted.  A regular expression specifies a set of character strings.
  98.      A member of this set of strings is said to be matched by the regular
  99.      expression.  The regular expressions allowed by _eeee_dddd are constructed as
  100.      follows:
  101.  
  102.      The following one-character regular expressions match a single character:
  103.  
  104.      1.1   An ordinary character (not one of those discussed in 1.2 below) is
  105.            a one-character regular expression that matches itself.
  106.  
  107.      1.2   A backslash (_\\\\) followed by any special character is a one-
  108.            character regular expression that matches the special character
  109.            itself.  The special characters are:
  110.  
  111.            a.   _...., _****, _[[[[, and _\\\\ (period, asterisk, left square bracket, and
  112.                 backslash, respectively), which are always special, except
  113.                 when they appear within square brackets (_[[[[_]]]]; see 1.4 below).
  114.  
  115.            b.   _^^^^ (caret or circumflex), which is special at the beginning of
  116.                 a regular expression (see 4.1 and 4.3 below), or when it
  117.                 immediately follows the left of a pair of square brackets (_[[[[_]]]])
  118.                 (see 1.4 below).
  119.  
  120.            c.   _$$$$ (dollar sign), which is special at the _eeee_nnnn_dddd of a regular
  121.                 expression (see 4.2 below).
  122.  
  123.            d.   The character that is special for that specific regular
  124.                 expression, that is used to bound (or delimit) a regular
  125.                 expression.  (For example, see how slash (_////) is used in the _gggg
  126.  
  127.  
  128.  
  129.                                                                         PPPPaaaaggggeeee 2222
  130.  
  131.  
  132.  
  133.  
  134.  
  135.  
  136. eeeedddd((((1111))))                                                                    eeeedddd((((1111))))
  137.  
  138.  
  139.  
  140.                 command, below.)
  141.  
  142.      1.3   A period (_....) is a one-character regular expression that matches any
  143.            character, including supplementary code set characters, except
  144.            newline.
  145.  
  146.      1.4   A non-empty string of characters enclosed in square brackets (_[[[[_]]]])
  147.            is a one-character regular expression that matches one character,
  148.            including supplementary code set characters, in that string.  If,
  149.            however, the first character of the string is a circumflex (_^^^^), the
  150.            one-character regular expression matches any character, including
  151.            supplementary code set characters, except newline and the remaining
  152.            characters in the string.  The _^^^^ has this special meaning only if
  153.            it occurs first in the string.  The minus (_----) can be used to
  154.            indicate a range of consecutive characters, including supplementary
  155.            code set characters; for example, _[[[[_0000_----_9999_]]]] is equivalent to
  156.            _[[[[_0000_1111_2222_3333_4444_5555_6666_7777_8888_9999_]]]].  Characters specifying the range must be from the
  157.            same code set; when the characters are from different code sets,
  158.            one of the characters specifying the range is matched.  The _---- loses
  159.            this special meaning if it occurs first (after an initial _^^^^, if
  160.            any) or last in the string.  The right square bracket (_]]]]) does not
  161.            terminate such a string when it is the first character within it
  162.            (after an initial _^^^^, if any); for example, _[[[[_]]]]_aaaa_----_ffff_]]]] matches either a
  163.            right square bracket (_]]]]) or one of the ASCII letters _aaaa through _ffff
  164.            inclusive.  The four characters listed in 1.2.a above stand for
  165.            themselves within such a string of characters.
  166.  
  167.      The following rules can be used to construct regular expressions from
  168.      one-character regular expressions:
  169.  
  170.      2.1   A one-character regular expression is an regular expression that
  171.            matches whatever the one-character regular expression matches.
  172.  
  173.      2.2   A one-character regular expression followed by an asterisk (_****) is a
  174.            regular expression that matches zero or more occurrences of the
  175.            one-character regular expression, which can be a supplementary code
  176.            set character.  If there is any choice, the longest leftmost string
  177.            that permits a match is chosen.
  178.  
  179.      2.3   A one-character regular expression followed by _\\\\_{{{{_m_\\\\_}}}}, _\\\\_{{{{_m,_\\\\_}}}}, or
  180.            _\\\\_{{{{_m,_n_\\\\_}}}} is a regular expression that matches a range of occurrences
  181.            of the one-character regular expression.  The values of _m and _n
  182.            must be non-negative integers less than 256; _\\\\_{{{{_m_\\\\_}}}} matches exactly
  183.            _m occurrences; _\\\\_{{{{_m,_\\\\_}}}} matches at least _m occurrences; _\\\\_{{{{_m,_n_\\\\_}}}}
  184.            matches any number of occurrences between _m and _n inclusive.
  185.            Whenever a choice exists, the regular expression matches as many
  186.            occurrences as possible.
  187.  
  188.      2.4   The concatenation of regular expressions is an regular expression
  189.            that matches the concatenation of the strings matched by each
  190.            component of the regular expression.
  191.  
  192.  
  193.  
  194.  
  195.                                                                         PPPPaaaaggggeeee 3333
  196.  
  197.  
  198.  
  199.  
  200.  
  201.  
  202. eeeedddd((((1111))))                                                                    eeeedddd((((1111))))
  203.  
  204.  
  205.  
  206.      2.5   A regular expression enclosed between the character sequences _\\\\_((((
  207.            and _\\\\_)))) defines a sub-expression that matches whatever the unadorned
  208.            regular expression matches.  Inside a sub-expression the anchor
  209.            characters ((_^^^^) and (_$$$$)) have no special meaning and match their
  210.            respective literal characters.
  211.  
  212.      2.6   The expression _\\\\_n matches the same string of characters as was
  213.            matched by an expression enclosed between _\\\\_(((( and _\\\\_)))) earlier in the
  214.            same regular expression.  Here _n is a digit; the sub-expression
  215.            specified is that beginning with the _n-th occurrence of _\\\\_(((( counting
  216.            from the left.  For example, the expression ^_\\\\_((((_...._****_\\\\_))))_\\\\_1111_$$$$ matches a
  217.            line consisting of two repeated appearances of the same string.
  218.  
  219.      A regular expression can be constrained to match words.
  220.  
  221.      3.1   _\\\\_<<<< constrains a regular expression to match the beginning of a
  222.            string or to follow a character that is not a digit, underscore, or
  223.            letter.  The first character matching the regular expression must
  224.            be a digit, underscore, or letter.
  225.  
  226.      3.2   _\\\\_>>>> constrains a regular expression to match the end of a string or
  227.            to precede a character that is not a digit, underscore, or letter.
  228.  
  229.      A regular expression can be constrained to match only an initial segment
  230.      or final segment of a line (or both).
  231.  
  232.      4.1   A circumflex (_^^^^) at the beginning of a regular expression
  233.            constrains that regular expression to match an initial segment of a
  234.            line.
  235.  
  236.      4.2   A dollar sign (_$$$$) at the end of an entire regular expression
  237.            constrains that regular expression to match a final segment of a
  238.            line.
  239.  
  240.      4.3   The construction _^^^^_r_e_g_u_l_a_r _e_x_p_r_e_s_s_i_o_n_$$$$ constrains the regular
  241.            expression to match the entire line.
  242.  
  243.      The null regular expression (for example, _////_////) is equivalent to the last
  244.      regular expression encountered.  See also the last paragraph of the
  245.      DESCRIPTION section below.
  246.  
  247.      To understand addressing in _eeee_dddd it is necessary to know that at any time
  248.      there is a _c_u_r_r_e_n_t _l_i_n_e.  Generally speaking, the current line is the
  249.      last line affected by a command; the exact effect on the current line is
  250.      discussed under the description of each command.  _a_d_d_r_e_s_s_e_s are
  251.      constructed as follows:
  252.  
  253.       1.  The character _.... addresses the current line.
  254.  
  255.       2.  The character _$$$$ addresses the last line of the buffer.
  256.  
  257.  
  258.  
  259.  
  260.  
  261.                                                                         PPPPaaaaggggeeee 4444
  262.  
  263.  
  264.  
  265.  
  266.  
  267.  
  268. eeeedddd((((1111))))                                                                    eeeedddd((((1111))))
  269.  
  270.  
  271.  
  272.       3.  A decimal number _n addresses the _n-th line of the buffer.
  273.  
  274.       4.  '_x addresses the line marked with the mark name character _x, which
  275.           must be a lower-case letter (_aaaa-_zzzz).  Lines are marked with the _kkkk
  276.           command described below.
  277.  
  278.       5.  A regular expression enclosed by slashes (_////) addresses the first
  279.           line found by searching forward from the line following the current
  280.           line toward the end of the buffer and stopping at the first line
  281.           containing a string matching the regular expression.  If necessary,
  282.           the search wraps around to the beginning of the buffer and continues
  283.           up to and including the current line, so that the entire buffer is
  284.           searched.  See also the last paragraph of the DESCRIPTION section
  285.           below.
  286.  
  287.       6.  A regular expression enclosed in question marks (_????) addresses the
  288.           first line found by searching backward from the line preceding the
  289.           current line toward the beginning of the buffer and stopping at the
  290.           first line containing a string matching the regular expression.  If
  291.           necessary, the search wraps around to the end of the buffer and
  292.           continues up to and including the current line.  See also the last
  293.           paragraph of the DESCRIPTION section below.
  294.  
  295.       7.  An address followed by a plus sign (_++++) or a minus sign (_----) followed
  296.           by a decimal number specifies that address plus (respectively minus)
  297.           the indicated number of lines.  A shorthand for _...._++++_5555 is _...._5555.
  298.  
  299.       8.  If an address begins with _++++ or _----, the addition or subtraction is
  300.           taken with respect to the current line; for example, _----_5555 is
  301.           understood to mean _...._----_5555.
  302.  
  303.       9.  If an address ends with _++++ or _----, 1 is added to or subtracted from the
  304.           address, respectively.  As a consequence of this rule and of Rule 8,
  305.           immediately above, the address _---- refers to the line preceding the
  306.           current line.  (To maintain compatibility with earlier versions of
  307.           the editor, the character _^^^^ in addresses is entirely equivalent to
  308.           _----.)  Moreover, trailing _++++ and _---- characters have a cumulative effect,
  309.           so _----_---- refers to the current line less 2.
  310.  
  311.      10.  For convenience, a comma (_,,,,) stands for the address pair _1111_,,,,_$$$$, while
  312.           a semicolon (_;;;;) stands for the pair _...._,,,,_$$$$.
  313.  
  314.      Commands may require zero, one, or two addresses.  Commands that require
  315.      no addresses regard the presence of an address as an error.  Commands
  316.      that accept one or two addresses assume default addresses when an
  317.      insufficient number of addresses is given; if more addresses are given
  318.      than such a command requires, the last one(s) are used.
  319.  
  320.      Typically, addresses are separated from each other by a comma (_,,,,).  They
  321.      can also be separated by a semicolon (_;;;;).  In the latter case, the first
  322.      address is calculated, the current line (.) is set to that value, and
  323.      then the second address is calculated.  This feature can be used to
  324.  
  325.  
  326.  
  327.                                                                         PPPPaaaaggggeeee 5555
  328.  
  329.  
  330.  
  331.  
  332.  
  333.  
  334. eeeedddd((((1111))))                                                                    eeeedddd((((1111))))
  335.  
  336.  
  337.  
  338.      determine the starting line for forward and backward searches (see Rules
  339.      5 and 6, above).  The second address of any two-address sequence must
  340.      correspond to a line in the buffer that follows the line corresponding to
  341.      the first address.
  342.  
  343.      In the following list of _eeee_dddd commands, the parentheses shown prior to the
  344.      command are not part of the address; rather they show the default
  345.      address(es) for the command.
  346.  
  347.      It is generally illegal for more than one command to appear on a line.
  348.      However, any command (except _eeee, _ffff, _rrrr, or _wwww) can be suffixed by _llll, _nnnn, or _pppp
  349.      in which case the current line is either listed, numbered or printed,
  350.      respectively, as discussed below under the _llll, _nnnn, and _pppp commands.
  351.  
  352.      _((((_...._))))_aaaa
  353.      _t_e_x_t
  354.      _....
  355.           The _aaaappend command accepts zero or more lines of text and appends it
  356.           after the addressed line in the buffer.  The current line (_....) is
  357.           left at the last inserted line, or, if there were none, at the
  358.           addressed line.  Address 0 is legal for this command: it causes the
  359.           ``appended'' text to be placed at the beginning of the buffer.  The
  360.           maximum number of bytes that can be entered from a terminal is 256
  361.           per line (including the newline character).
  362.  
  363.      _((((_...._))))_cccc
  364.      _t_e_x_t
  365.      _....
  366.           The _cccchange command deletes the addressed lines from the buffer, then
  367.           accepts zero or more lines of text that replaces these lines in the
  368.           buffer.  The current line (_....) is left at the last line input, or, if
  369.           there were none, at the first line that was not deleted.
  370.  
  371.      _CCCC
  372.           Same as the _XXXX command, described later, except that _eeee_dddd assumes all
  373.           text read in for the _eeee and _rrrr commands is encrypted unless a null key
  374.           is typed in.
  375.  
  376.      _((((_...._,,,,_...._))))_dddd
  377.           The _ddddelete command deletes the addressed lines from the buffer.  The
  378.           line after the last line deleted becomes the current line; if the
  379.           lines deleted were originally at the end of the buffer, the new last
  380.           line becomes the current line.
  381.  
  382.      _eeee _f_i_l_e
  383.           The _eeeedit command deletes the entire contents of the buffer and then
  384.           reads the contents of _f_i_l_e into the buffer.  The current line (_....) is
  385.           set to the last line of the buffer.  If _f_i_l_e is not given, the
  386.           currently remembered filename, if any, is used (see the _ffff command).
  387.           The number of characters read in is printed; _f_i_l_e is remembered for
  388.           possible use as a default filename in subsequent _eeee, _rrrr, and _wwww
  389.           commands.  If _f_i_l_e is replaced by _!!!!, the rest of the line is taken
  390.  
  391.  
  392.  
  393.                                                                         PPPPaaaaggggeeee 6666
  394.  
  395.  
  396.  
  397.  
  398.  
  399.  
  400. eeeedddd((((1111))))                                                                    eeeedddd((((1111))))
  401.  
  402.  
  403.  
  404.           to be a shell (_ssss_hhhh(1)) command whose output is to be read in.  Such a
  405.           shell command is not remembered as the current filename.  See also
  406.           DIAGNOSTICS below.  If _f_i_l_e is replaced by _%%%%, and if additional _f_i_l_e
  407.           arguments were specified on the command line, the next filename
  408.           specified on the command line is used.
  409.  
  410.      _EEEE _f_i_l_e
  411.           The _EEEEdit command is like _eeee, except that the editor does not check to
  412.           see if any changes have been made to the buffer since the last _wwww
  413.           command.
  414.  
  415.      _ffff _f_i_l_e
  416.           If _f_i_l_e is given, the _ffffile-name command changes the currently
  417.           remembered filename to _f_i_l_e; otherwise, it prints the currently
  418.           remembered filename.
  419.  
  420.      _((((_1111_,,,,_$$$$_))))_gggg_////_r_e_g_u_l_a_r _e_x_p_r_e_s_s_i_o_n_////_c_o_m_m_a_n_d _l_i_s_t
  421.           In the _gggglobal command, the first step is to mark every line that
  422.           matches the given regular expression.  Then, for every such line,
  423.           the given _c_o_m_m_a_n_d _l_i_s_t is executed with the current line (_....)
  424.           initially set to that line.  A single command or the first of a list
  425.           of commands appears on the same line as the global command.  All
  426.           lines of a multi-line list except the last line must be ended with a
  427.           _\\\\; _aaaa, _iiii, and _cccc commands and associated input are permitted.  The _....
  428.           terminating input mode can be omitted if it would be the last line
  429.           of the _c_o_m_m_a_n_d _l_i_s_t.  An empty _c_o_m_m_a_n_d _l_i_s_t is equivalent to the _pppp
  430.           command.  The _gggg, _GGGG, _vvvv, and _VVVV commands are not permitted in the
  431.           _c_o_m_m_a_n_d _l_i_s_t.  See also the NOTES section and the last paragraph of
  432.           the DESCRIPTION section below.
  433.  
  434.      _((((_1111_,,,,_$$$$_))))_GGGG_////_r_e_g_u_l_a_r _e_x_p_r_e_s_s_i_o_n_////
  435.           In the interactive _GGGGlobal command, the first step is to mark every
  436.           line that matches the given regular expression.  Then, for every
  437.           such line, that line is printed, the current line (_....) is changed to
  438.           that line, and any one command (other than one of the _aaaa, _cccc, _iiii, _gggg, _GGGG,
  439.           _vvvv, and _VVVV commands) can be input and is executed.  After the
  440.           execution of that command, the next marked line is printed, and so
  441.           on; a newline acts as a null command; an _&&&& causes the re-execution
  442.           of the most recent command executed within the current invocation of
  443.           _GGGG.  Note that the commands input as part of the execution of the _GGGG
  444.           command can address and affect any lines in the buffer.  The _GGGG
  445.           command can be terminated by an interrupt signal (ASCII DEL or
  446.           BREAK).
  447.  
  448.      _hhhh
  449.           The _hhhhelp command gives a short error message that explains the
  450.           reason for the most recent _???? diagnostic.
  451.  
  452.      _HHHH
  453.           The _HHHHelp command causes _eeee_dddd to enter a mode in which error messages
  454.           are printed for all subsequent _???? diagnostics.  It also explains the
  455.           previous _???? if there was one.  The _HHHH command alternately turns this
  456.  
  457.  
  458.  
  459.                                                                         PPPPaaaaggggeeee 7777
  460.  
  461.  
  462.  
  463.  
  464.  
  465.  
  466. eeeedddd((((1111))))                                                                    eeeedddd((((1111))))
  467.  
  468.  
  469.  
  470.           mode on and off; it is initially off.
  471.  
  472.      _((((_...._))))_iiii
  473.      _t_e_x_t
  474.      _....
  475.           The _iiiinsert command accepts zero or more lines of text and inserts it
  476.           before the addressed line in the buffer.  The current line (_....) is
  477.           left at the last inserted line, or, if there were none, at the
  478.           addressed line.  This command differs from the _aaaa command only in the
  479.           placement of the input text.  Address 0 is not legal for this
  480.           command.  The maximum number of characters that can be entered from
  481.           a terminal is 256 per line (including the newline character).
  482.  
  483.      _((((_...._,,,,_...._++++_1111_))))_jjjj
  484.           The _jjjjoin command joins contiguous lines by removing the appropriate
  485.           newline characters.  If exactly one address is given, this command
  486.           does nothing.
  487.  
  488.      _((((_...._))))_kkkk_x
  489.           The mar_kkkk command marks the addressed line with name _x, which must be
  490.           a lower-case letter (_aaaa-_zzzz).  The address '_x then addresses this line;
  491.           the current line (_....) is unchanged.
  492.  
  493.      _((((_...._,,,,_...._))))_llll
  494.           The _llllist command prints the addressed lines in an unambiguous way:
  495.           a few non-printing characters (for example, tab, backspace) are
  496.           represented by visually mnemonic overstrikes.  All other non-
  497.           printing characters are printed in octal, and long lines are folded.
  498.           An _llll command can be appended to any command other than _eeee, _ffff, _rrrr, or
  499.           _wwww.
  500.  
  501.      _((((_...._,,,,_...._))))_mmmm_a
  502.           The _mmmmove command repositions the addressed line(s) after the line
  503.           addressed by _a.  Address _0000 is legal for _a and causes the addressed
  504.           line(s) to be moved to the beginning of the file.  It is an error if
  505.           address _a falls within the range of moved lines; the current line
  506.           (_....) is left at the last line moved.
  507.  
  508.      _((((_...._,,,,_...._))))_nnnn
  509.           The _nnnnumber command prints the addressed lines, preceding each line
  510.           by its line number and a tab character; the current line (_....) is left
  511.           at the last line printed.  The _nnnn command can be appended to any
  512.           command other than _eeee, _ffff, _rrrr, or _wwww.
  513.  
  514.      _((((_...._,,,,_...._))))_pppp
  515.           The _pppprint command prints the addressed lines; the current line (_....)
  516.           is left at the last line printed.  The _pppp command can be appended to
  517.           any command other than _eeee, _ffff, _rrrr, or _wwww.  For example, _dddd_pppp deletes the
  518.           current line and prints the new current line.
  519.  
  520.  
  521.  
  522.  
  523.  
  524.  
  525.                                                                         PPPPaaaaggggeeee 8888
  526.  
  527.  
  528.  
  529.  
  530.  
  531.  
  532. eeeedddd((((1111))))                                                                    eeeedddd((((1111))))
  533.  
  534.  
  535.  
  536.      _PPPP
  537.           The editor prompts with a _**** for all subsequent commands.  The _PPPP
  538.           command alternately turns this mode on and off; it is initially off.
  539.  
  540.      _qqqq
  541.           The _qqqquit command causes _eeee_dddd to exit.  No automatic write of a file is
  542.           done; however, see DIAGNOSTICS below.
  543.  
  544.      _QQQQ
  545.           The editor exits without checking if changes have been made in the
  546.           buffer since the last _wwww command.
  547.  
  548.      _((((_$$$$_))))_rrrr _f_i_l_e
  549.           The _rrrread command reads the contents of _f_i_l_e into the buffer.  If
  550.           _f_i_l_e is not given, the currently remembered filename, if any, is
  551.           used (see the _eeee and _ffff commands).  The currently remembered filename
  552.           is not changed unless _f_i_l_e is the very first filename mentioned
  553.           since _eeee_dddd was invoked.  Address 0 is legal for _rrrr and causes the file
  554.           to be read in at the beginning of the buffer.  If the read is
  555.           successful, the number of characters read in is printed; the current
  556.           line (_....) is set to the last line read in.  If _f_i_l_e is replaced by _!!!!,
  557.           the rest of the line is taken to be a shell (see _ssss_hhhh(1)) command
  558.           whose output is to be read in.  For example, _$$$$_rrrr _!!!!_llll_ssss appends current
  559.           directory to the end of the file being edited.  Such a shell command
  560.           is not remembered as the current filename.
  561.  
  562.      _((((_...._,,,,_...._))))_ssss_////_r_e_g_u_l_a_r _e_x_p_r_e_s_s_i_o_n_////_r_e_p_l_a_c_e_m_e_n_t_////         or
  563.      _((((_...._,,,,_...._))))_ssss_////_r_e_g_u_l_a_r _e_x_p_r_e_s_s_i_o_n_////_r_e_p_l_a_c_e_m_e_n_t_////_gggg        or
  564.      _((((_...._,,,,_...._))))_ssss_////_r_e_g_u_l_a_r _e_x_p_r_e_s_s_i_o_n_////_r_e_p_l_a_c_e_m_e_n_t_////_n        _n = 1-512
  565.           The _ssssubstitute command searches each addressed line for an
  566.           occurrence of the specified regular expression.  In each line in
  567.           which a match is found, all (non-overlapped) matched strings are
  568.           replaced by the _r_e_p_l_a_c_e_m_e_n_t if the global replacement indicator _gggg
  569.           appears after the command.  If the global indicator does not appear,
  570.           only the first occurrence of the matched string is replaced.  If a
  571.           number _n, appears after the command, only the _n-th occurrence of the
  572.           matched string on each addressed line is replaced.  It is an error
  573.           if the substitution fails on all addressed lines.  Any character
  574.           other than space or newline can be used instead of _//// to delimit the
  575.           regular expression and the _r_e_p_l_a_c_e_m_e_n_t; the current line (_....) is left
  576.           at the last line on which a substitution occurred.  See also the
  577.           last paragraph of the DESCRIPTION section below.
  578.  
  579.           An ampersand (_&&&&) appearing in the _r_e_p_l_a_c_e_m_e_n_t is replaced by the
  580.           string matching the regular expression on the current line.  The
  581.           special meaning of _&&&& in this context can be suppressed by preceding
  582.           it by _\\\\.  As a more general feature, the characters _\\\\_n, where _n is a
  583.           digit, are replaced by the text matched by the _n-th regular
  584.           subexpression of the specified regular expression enclosed between
  585.           _\\\\_(((( and _\\\\_)))).  When nested parenthesized subexpressions are present, _n
  586.           is determined by counting occurrences of _\\\\_(((( starting from the left.
  587.           When the character _%%%% is the only character in the _r_e_p_l_a_c_e_m_e_n_t, the
  588.  
  589.  
  590.  
  591.                                                                         PPPPaaaaggggeeee 9999
  592.  
  593.  
  594.  
  595.  
  596.  
  597.  
  598. eeeedddd((((1111))))                                                                    eeeedddd((((1111))))
  599.  
  600.  
  601.  
  602.           _r_e_p_l_a_c_e_m_e_n_t used in the most recent substitute command is used as
  603.           the _r_e_p_l_a_c_e_m_e_n_t in the current substitute command.  The _%%%% loses its
  604.           special meaning when it is in a replacement string of more than one
  605.           character or is preceded by a _\\\\.
  606.  
  607.           A line can be split by substituting a newline character into it.
  608.           The newline in the _r_e_p_l_a_c_e_m_e_n_t must be escaped by preceding it by _\\\\.
  609.           Such substitution cannot be done as part of a _gggg or _vvvv command list.
  610.  
  611.      _((((_...._,,,,_...._))))_tttt_a
  612.           This command acts just like the _mmmm command, except that a copy of the
  613.           addressed lines is placed after address _aaaa (which can be 0); the
  614.           current line (_....) is left at the last line copied.
  615.  
  616.      _uuuu
  617.           The _uuuundo command nullifies the effect of the most recent command
  618.           that modified anything in the buffer, namely the most recent _aaaa, _cccc,
  619.           _dddd, _gggg, _iiii, _jjjj, _mmmm, _rrrr, _ssss, _tttt, _vvvv, _GGGG, or _VVVV command.
  620.  
  621.      _((((_1111_,,,,_$$$$_))))_vvvv_////_r_e_g_u_l_a_r _e_x_p_r_e_s_s_i_o_n_////_c_o_m_m_a_n_d _l_i_s_t
  622.           This command is the same as the global command _gggg, except that the
  623.           lines marked during the first step are those that do not match the
  624.           regular expression.
  625.  
  626.      _((((_1111_,,,,_$$$$_))))_VVVV_////_r_e_g_u_l_a_r _e_x_p_r_e_s_s_i_o_n_////
  627.           This command is the same as the interactive global command _GGGG, except
  628.           that the lines that are marked during the first step are those that
  629.           do not match the regular expression.
  630.  
  631.      _((((_1111_,,,,_$$$$_))))_wwww _f_i_l_e
  632.           The _wwwwrite command writes the addressed lines into _f_i_l_e.  If _f_i_l_e
  633.           does not exist, it is created with mode _6666_6666_6666 (readable and writable
  634.           by everyone), unless your file creation mask dictates otherwise; see
  635.           the description of the _uuuu_mmmm_aaaa_ssss_kkkk special command on _ssss_hhhh(1).  The
  636.           currently remembered filename is not changed unless _f_i_l_e is the very
  637.           first filename mentioned since _eeee_dddd was invoked.  If no filename is
  638.           given, the currently remembered filename, if any, is used (see the _eeee
  639.           and _ffff commands); the current line (_....) is unchanged.  If the command
  640.           is successful, the number of characters written is printed.  If _f_i_l_e
  641.           is replaced by _!!!!, the rest of the line is taken to be a shell (see
  642.           _ssss_hhhh(1)) command whose standard input is the addressed lines.  Such a
  643.           shell command is not remembered as the current filename.
  644.  
  645.      _((((_1111_,,,,_$$$$_))))_WWWW _f_i_l_e
  646.           This command is the same as the _wwwwrite command above, except that it
  647.           appends the addressed lines to the end of _f_i_l_e if it exists.  If
  648.           _f_i_l_e does not exist, it is created as described above for the _wwww
  649.           command.
  650.  
  651.      _XXXX
  652.           A key is prompted for, and it is used in subsequent _eeee, _rrrr, and _wwww
  653.           commands to decrypt and encrypt text using the _cccc_rrrr_yyyy_pppp_tttt(1) algorithm.
  654.  
  655.  
  656.  
  657.                                                                        PPPPaaaaggggeeee 11110000
  658.  
  659.  
  660.  
  661.  
  662.  
  663.  
  664. eeeedddd((((1111))))                                                                    eeeedddd((((1111))))
  665.  
  666.  
  667.  
  668.           An educated guess is made to determine whether text read in for the
  669.           _eeee and _rrrr commands is encrypted.  A null key turns off encryption.
  670.           Subsequent _eeee, _rrrr, and _wwww commands use this key to encrypt or decrypt
  671.           the text (see _cccc_rrrr_yyyy_pppp_tttt(1)).  An explicitly empty key turns off
  672.           encryption.  Also, see the _----_xxxx option of _eeee_dddd.
  673.  
  674.      _((((_$$$$_))))_====
  675.           The line number of the addressed line is typed; the current line (_....)
  676.           is unchanged by this command.
  677.  
  678.      _!!!!_s_h_e_l_l _c_o_m_m_a_n_d
  679.           The remainder of the line after the _!!!! is sent to the UNIX system
  680.           shell (see _ssss_hhhh(1)) to be interpreted as a command.  Within the text
  681.           of that command, the unescaped character _%%%% is replaced with the
  682.           remembered filename; if a _!!!! appears as the first character of the
  683.           shell command, it is replaced with the text of the previous shell
  684.           command.  Thus, _!!!!_!!!! repeats the last shell command.  If any expansion
  685.           is performed, the expanded line is echoed; the current line (_....) is
  686.           unchanged.
  687.  
  688.      _((((_...._++++_1111_))))<newline>
  689.           An address alone on a line causes the addressed line to be printed.
  690.           A newline alone is equivalent to _...._++++_1111_pppp; it is useful for stepping
  691.           forward through the buffer.
  692.  
  693.      If an interrupt signal (ASCII DEL or BREAK) is sent, _eeee_dddd prints a _???? and
  694.      returns to its command level.
  695.  
  696.      Some size limitations:  512 bytes in a line, 256 bytes in a global
  697.      command list, and 1024 bytes in the pathname of a file (counting
  698.      slashes).  The limit on the number of lines depends on the amount of user
  699.      memory:  each line takes 1 word.
  700.  
  701.      When reading a file, _eeee_dddd discards ASCII NUL characters.
  702.  
  703.      If a file is not terminated by a newline character, _eeee_dddd adds one and puts
  704.      out a message explaining what it did.
  705.  
  706.      If the closing delimiter of a regular expression or of a replacement
  707.      string (for example, _////) would be the last character before a newline,
  708.      that delimiter can be omitted, in which case the addressed line is
  709.      printed.  The following pairs of commands are equivalent:
  710.  
  711.           _ssss_////_ssss_1111_////_ssss_2222   _ssss_////_ssss_1111_////_ssss_2222_////_pppp
  712.           _gggg_////_ssss_1111      _gggg_////_ssss_1111_////_pppp
  713.           _????_ssss_1111       _????_ssss_1111_????
  714.  
  715. FFFFIIIILLLLEEEESSSS
  716.      _$$$$_TTTT_MMMM_PPPP_DDDD_IIII_RRRR    if this environmental variable is not null, its value is used
  717.                 in place of _////_vvvv_aaaa_rrrr_////_tttt_mmmm_pppp as the directory name for the temporary
  718.                 work file
  719.  
  720.  
  721.  
  722.  
  723.                                                                        PPPPaaaaggggeeee 11111111
  724.  
  725.  
  726.  
  727.  
  728.  
  729.  
  730. eeeedddd((((1111))))                                                                    eeeedddd((((1111))))
  731.  
  732.  
  733.  
  734.      _////_vvvv_aaaa_rrrr_////_tttt_mmmm_pppp   if _////_vvvv_aaaa_rrrr_////_tttt_mmmm_pppp exists, it is used as the directory name for the
  735.                 temporary work file
  736.      _////_tttt_mmmm_pppp       if the environmental variable _TTTT_MMMM_PPPP_DDDD_IIII_RRRR does not exist or is
  737.                 null, and if _////_vvvv_aaaa_rrrr_////_tttt_mmmm_pppp does not exist, _////_tttt_mmmm_pppp is used as the
  738.                 directory name for the temporary work file
  739.      _eeee_dddd_...._hhhh_uuuu_pppp     work is saved here if the terminal is hung up
  740.      _////_uuuu_ssss_rrrr_////_llll_iiii_bbbb_////_llll_oooo_cccc_aaaa_llll_eeee_////_l_o_c_a_l_e_////_LLLL_CCCC______MMMM_EEEE_SSSS_SSSS_AAAA_GGGG_EEEE_SSSS_////_uuuu_xxxx_cccc_oooo_rrrr_eeee_...._aaaa_bbbb_iiii
  741.                 language-specific message file (see _LLLL_AAAA_NNNN_GGGG in _eeee_nnnn_vvvv_iiii_rrrr_oooo_nnnn (5))
  742.  
  743. SSSSEEEEEEEE AAAALLLLSSSSOOOO
  744.      edit(1), ex(1), grep(1), sed(1), sh(1), stty(1), umask(1), vi(1),
  745.      fspec(4), regexp(5).
  746.  
  747. DDDDIIIIAAAAGGGGNNNNOOOOSSSSTTTTIIIICCCCSSSS
  748.      _????       Command errors.  Type the _hhhh command for a short error message.
  749.  
  750.      _????_f_i_l_e   An inaccessible file.  (Use the _hhhhelp and _HHHHelp commands for
  751.              detailed explanations.)
  752.  
  753.      If changes have been made in the buffer since the last _wwww command that
  754.      wrote the entire buffer, _eeee_dddd warns the user if an attempt is made to
  755.      destroy _eeee_dddd's buffer via the _eeee or _qqqq commands.  It prints _????  and allows one
  756.      to continue editing.  A second _eeee or _qqqq command at this point takes effect.
  757.      The _----_ssss command-line option inhibits this feature.
  758.  
  759. NNNNOOOOTTTTEEEESSSS
  760.      The _---- option, although it continues to be supported, has been replaced in
  761.      the documentation by the _----_ssss option that follows the Command Syntax
  762.      Standard (see _iiii_nnnn_tttt_rrrr_oooo(1)).
  763.  
  764.      A _!!!! command cannot be subject to a _gggg or a _vvvv command.
  765.  
  766.      The _!!!! command and the _!!!! escape from the _eeee, _rrrr, and _wwww commands cannot be
  767.      used if the editor is invoked from a restricted shell (see _ssss_hhhh(1)).
  768.  
  769.      The sequence _\\\\_nnnn in a regular expression does not match a newline
  770.      character.
  771.  
  772.      If the editor input is coming from a command file (for example, _eeee_dddd _f_i_l_e _<<<<
  773.      _e_d__c_m_d__f_i_l_e ), the editor exits at the first failure.
  774.  
  775.  
  776.  
  777.  
  778.  
  779.  
  780.  
  781.  
  782.  
  783.  
  784.  
  785.  
  786.  
  787.  
  788.  
  789.                                                                        PPPPaaaaggggeeee 11112222
  790.  
  791.  
  792.  
  793.